#include "VirtualBusinessClient.h"
#include "IVirtualBusiness.h"
#include "IContainer.h"
#include "ILogger.h"

void VirtualBusinessClient::onLoad(INode *node) {
    IContainer * container = Bean<IContainer>("client").pointer();
    if (container)
    {
       
        container->on(OPEN,[=](ISession * session) ->int{
            LogI("send try to send");
            session->Business<IVirtualBusiness>()->echo(session->getServlet(),"form:client hello,world");
            Information info;
            info.data.x = 100;
            info.data.y = "hello";
            session->Business<IVirtualBusiness>()->testRemoteLogicV1(session->getServlet(),1,1100.101,info);
            return 0;
        });
    }
}

REG_PLUGIN(VirtualBusinessClient);
